package com.dcd.service;

import com.dcd.pojo.Follow_car_series;
import com.dcd.service.impl.Follow_car_seriesServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
@Component
@FeignClient(name = "donchedi-provider9091", fallback = Follow_car_seriesServiceImpl.class, contextId = "followCarSeries")
public interface Follow_car_seriesService {


    /**
     * 关注指定车系/删除指定用户关注的车系
     *
     * @param follow_car_series 关注车系对象
     * @param type              insert/delete
     * @return
     */
    @RequestMapping("/insert_or_delete_follow_car_series")
    String insert_or_delete_follow_car_series(@RequestBody Follow_car_series follow_car_series, @RequestParam String type);

    /**
     * 查询用户是否关注指定车系
     *
     * @param follow_car_series
     * @return
     */
    @RequestMapping("/select_user_whether_follow_car_series")
    String select_user_whether_follow_car_series(@RequestBody Follow_car_series follow_car_series);

    /**
     * 根据用户登录的id查询所有关注的车系
     * @param user_id 登录的用户id
     * @return
     */
    @RequestMapping("/select_follow_car_series")
    public List<Follow_car_series> select_follow_car_series(@RequestParam int user_id);

}
